package com.testDemo.hutool;

import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
import cn.hutool.crypto.symmetric.SymmetricCrypto;
import org.junit.jupiter.api.Test;

/**
 * @author: zour
 * @date: 2024/1/24
 * @description:
 */
public class SymmetricCryptoTest {
    @Test
    public void aes() throws Exception{
        SymmetricCrypto AES = new SymmetricCrypto(SymmetricAlgorithm.AES, "1234567890123456".getBytes("utf-8"));

        String aa = "{\"buttonId\":\"LIS54_20231205825821695298\",\"flag\":\"success\",\"msg\":\"52\",\"page\":\"/report/ProReportBudgetInput.jsp\",\"requestId\":\"1c7be12e-ff93-4fed-b296-96d69a63ee48\",\"requestJson\":{\"sqlId\":\"xreport.ProReportBudgetSql.ProReportBudgetSql1\",\"start\":\"1\",\"end\":\"10\",\"params\":[]},\"responseJson\":[[\"01\",\"代理人\",\"2021\",\"01\",\"394000\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"02\",\"342045\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"03\",\"2321943\",\"001\",\"2020-09-15\",\"15:03:19\",\"2022-10-11\",\"22:05:13\"],[\"01\",\"代理人\",\"2021\",\"04\",\"2566942\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"05\",\"2591942\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"06\",\"2596942\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"07\",\"2956942\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"08\",\"2990149\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"],[\"01\",\"代理人\",\"2021\",\"09\",\"888882\",\"001\",\"2020-09-15\",\"15:03:19\",\"2023-12-05\",\"16:06:46\"],[\"01\",\"代理人\",\"2021\",\"10\",\"0\",\"001\",\"2020-09-15\",\"15:03:19\",\"2020-09-15\",\"15:03:19\"]],\"url\":\"/common/easyQueryVer3/EasyQueryXML.jsp\"}";
        System.out.println(AES.encryptHex(aa));
    }
}
